import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
public class MemoryMap {
	public static void main(String[] args){
		try 
		{
 
			String sCurrentLine; 
			RandomAccessFile f = new RandomAccessFile("./TrainingDataSet/points1000.txt", "rw");
			MappedByteBuffer in = f.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, f.length());
			char myc;
			int size=0;
			long len = f.length();
			System.out.println(len);
		    while (size<len) 
		    {
		    //	myc = in.getChar();
		    	byte[] b;
		    	myc=(char)in.get(size);
		    	//System.out.println(myc);
		    	size++;
		    }
		    
		    f.close();
		}catch(Exception s){
			System.out.println(s);
		}
	}
}
